package com.smw.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.smw.dao.UserDao;
import com.smw.pojo.User;
import com.smw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

@Service
public class UserServiceImp implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    public User findPwdByName(String userName) {
        LambdaQueryWrapper<User> wrapper=new LambdaQueryWrapper<User>();
        wrapper.eq(User::getUserName,userName);

        User u=userDao.selectOne(wrapper);
        System.out.println("wrapper"+u);
        return u;

    }

    @Override
    public Set<String> findRole(String userName) {
        Set<String>u=userDao.findRole(userName);
        return u;
    }
}
